package figuriConcrete;
public class Point {
	private int x;
	private int y;
	
	public Point(int x,int y)
	{
		this.x=x;
		this.y=y;
	}
	public int getX()
	{
		return this.x;
	}
	public int getY()
	{
		return this.y;
	}
	public void setX(int x)
	{
		this.x=x;
	}
	public void setY(int y)
	{
		this.y=y;
	}
	public double distance(Point p2)
	{
        double r1=Math.abs(this.getX()-p2.getX());
		double r2=Math.abs(this.getY()-p2.getY());
		return r1+r2;
	}
	public String toString()
	{
		return "("+this.getX()+", "+this.getY()+")";
	}
	

}
